﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://wubiyu.cnblogs.com">
<head>
      <title></title>
      <link href="../../Theme/DomExtGray/gray.min.css" rel="Stylesheet" type="text/css" />
      <link href="PageModel.css" rel="Stylesheet" type="text/css" />
      <script type="text/javascript" src="../../domExt.min.js"></script>
</head>
<body>
      <div class="fun_title">
            _h.param(a, traditional);
      </div>
      <div class="fun_content">
            描述：将数组或者对象序列化。<br />
       </div>
      <div class="fun_title2">
            参数:
      </div>
      <div class="fun_content2">
           a：数组或者对象<br />
           traditional：false 为深度递归一个对象 true 为浅序列化 默认为false。你可以通过 h.ajaxSettings.traditional = true; 来全局得禁用这个功能。<br />
            <strong>Retrun:</strong><br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            返回序列化后的字符串<br /><br />
      </div>
      <div class="fun_title2">
            示例:
      </div>

      <input type="hidden" value="<div id='div1'><div class='testclass'>testdiv</div></div>"
            id="htmlcode">
      <div class="code">
            &lt;script type=&quot;text/javascript&quot;&gt;<br />
            &nbsp;&nbsp;&nbsp; var params = { width: 1680, height: 1050 };
            <br />
&nbsp;&nbsp;&nbsp; var str = _h.param(params); 
            <br />
&nbsp;&nbsp;&nbsp; alert(str);<br />
            &lt;/script&gt;</div>
            <br />
      <h:btn onclick="run_click();">执行脚本</h:btn>

      <script type="text/javascript">
            function run_click() {
                  var params = { width: 1680, height: 1050 };
                  var str = _h.param(params);
                  alert(str);
            }
      </script>
</body>
</html>
